<?php
namespace app\index\model;
use think\Model;
	class Admin extends Model
	{
		protected $connection="shop";
		public function deng(){
			$da=$this->limit(0,1)->select();
			$data['info']=$da;
			return $data;
		}
		public function zc($user,$pass){	
		$r=array("sname"=>$user,"spass"=>$pass,"smd"=>substr(md5($pass),3,8));
		$a=$this->save($r);
		if($a==true){
			$data["info"]="创建成功";
			return $data;
		}
		else{
			$data["info"]="创建失败";
			return $data;
		}
		}
		
	}